package core;

//This class contains the a Shaker containing x number of dices with x sides.

public class Shaker {
	private Dice[] dices;
	private int diceSum;

	public Shaker(Dice[] dices) {
		this.dices = dices;
	}
	
	public Shaker(int numberOfDices, int sides) {
		dices = new Dice[numberOfDices];
		for (int i = 0; i<numberOfDices; i++) dices[i] = new Dice(sides);
	}

	public void shake() {
		diceSum = 0;
		for (int i = 0; i < dices.length; i++) {
			dices[i].generateDice();
			diceSum += dices[i].getValue();
		}
	}
	

	public int getDiceSum() {
		return diceSum;
	}
	
	public Dice[] getDices() {
		return dices;
	}

}
